package utility;

import java.util.Properties;

public class PropertiesLoader {

    public static String getPropertyValue(String property){
        try {
            Properties properties = new Properties();
            properties.load(PropertiesLoader.class.getResourceAsStream("/system.properties"));
            return properties.getProperty(property);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return "Property value not found.";
    }

    public static Properties getProperties(){
        try {
            Properties properties = new Properties();
            properties.load(PropertiesLoader.class.getResourceAsStream("/system.properties"));
            return properties;
        } catch (Exception e) {
            e.printStackTrace();
        }
        return new Properties();
    }
}